The phenomenon of magnetic hysteresis has been observed for a long time in various magnetic materials which are widely used in electrical devices. For example, when an external magnetic field is applied to a ferromagnetic material (e.g., iron), atomic dipoles within the ferromagnetic material align with the magnetic field. When the external magnetic field is removed, part of the alignment may be retained as the ferromagnetic material has become magnetized. To demagnetize the ferromagnetic material, heat or a magnetic field in the opposite direction may need to be applied. Particularly, the relationship between field strength H and magnetization M is not linear in the ferromagnetic material. If the ferromagnetic material is demagnetized (e.g., H=M=0) and the relationship between H and M is plotted for increasing levels of field strength, M may follow an initial magnetization curve which increases rapidly at first and then approaches an asymptote called magnetic saturation. If the magnetic field is then reduced monotonically, M follows a curve different from the initial magnetization curve. At zero field strength, the magnetization is offset from the origin by a certain amount. If the H-M relationship is plotted for all strengths of the applied magnetic field, the result shows a hysteresis loop that is called a main loop. Magnetic hysteresis loops are not exclusive to materials with ferromagnetic ordering. Other magnetic orderings, such as spin glass ordering, also exhibit this phenomenon.